1. Field of the Invention
The present invention relates to a data updating method, and more particularly, the present invention relates to a method for updating a straight mapping flag in an optical recording medium.
2. Description of the Prior Art
A conventional CD-RW (Compact Disk-Rewritable) comprises a defect table (DT). When a CD-RW drive writes or reads a defective block in the disk, a replacement block can be found through the DT, which makes the disk more reliable.
Referring to FIG. 1, FIG. 1 is a schematic diagram of file arrangement for a conventional CD-RW 10. The CD 10 comprises at most 64 defect management areas (DMA) sequentially arranged and stored in the middle part 16 of the CD-RW 10. The CD-RW 10 also comprises a main detect table and a second defect table respectively stored in the lead-in Area 12 in the inner part of the CD-RW 10 and the program area 14 in the outer part of the CD 10.
Each of the DMAs comprises a data area (DA) and a spare area (SA). Therefore the CD-RW 10 comprises at most 64 DAs and 64 SAs. Conventionally, the DA comprises 4352 blocks for recording digital data, and the SA comprises 256 blocks as substitutes for the blocks in the DA to record the digital data when they are defective. Each of the blocks has a corresponding address for identification.
The data in the second defect table are duplicated from that in the main defect table, and hence both main and second detect tables are called as detect table (DT) 18 in the following description. The DT 18 comprises at most eight packets 19. Each packet 19 comprises four defect table block set (DTBS) 22, 24, 26, 28 arranged in a specific sequence. Each of the DTBSs 22, 24, 26, 28 comprises 8 defect table blocks (DTBs) 20. The four DTBS are used to repeatedly record the 8 DTBs 20. Therefore, the DT 18 totally comprises at most 64 DTBs corresponding to at most 64 SAs. Each of the DTBs 20 comprises a plurality of entries 30. The number of entries 30 is predetermined. Each of the entries 30 respectively corresponds to each of the 256 blocks of the SA. The entries are used to record the recording status of blocks in the corresponding SA and the address of the detective blocks of the substitute DA.
It is called straight mapping when the associated data of all the defective blocks in one of the DAs are merely recorded in the DTB corresponding to the DA in the DT. Otherwise, it is called non-straight mapping.
Each of the DTBs further comprises a mapping flag 32 for indicating whether the corresponding SA is straight mapping or not. In the prior art, when determining whether the mapping flag is straight mapping, it is necessary to examine the address of the defective blocks in the DAs recorded in all entries 30 one by one. However, such method is very time-consuming.